using System;
using PickGold.Charting;

namespace PickGold.Charting.Formulas
{
	internal class SeriesFieldInfo
	{
		private DataField _dataField;
		private Series _series;
		private string _seriesName;

		public SeriesFieldInfo(string seriesName, DataField dataField)
		{
			this._seriesName = seriesName;
			this._dataField = dataField;
		}

		public SeriesFieldInfo(Series series, DataField dataField)
		{
			this._series = series;
			this._dataField = dataField;
		}

		public DataField DataField
		{
			get
			{
				return this._dataField;
			}
		}

		public Series Series
		{
			get
			{
				return this._series;
			}
		}

		public string SeriesName
		{
			get
			{
				if (this._series == null)
				{
					return this._seriesName;
				}
				return this._series.Name;
			}
		}
	}
}

